A LOD slot to potentially draw, within a group slot. More...
Public Member Functions | |
EntityRenderLodSlot () | |
EntityRenderLodSlot (Mesh *mesh, Shader *shader) | |
~EntityRenderLodSlot () | |
const BoundingBox & | getBounds () const |
Mesh * | getMesh () const |
Shader * | getShader () const |
Shader * | getRaytracingShader () const |
float | getQualityMetric () const |
Shader * | getActiveShader () const |
EntityRenderInfoSlot * | getParentSlot () const |
Entity * | getParentEntity () const |
void | setMesh (Mesh *value) |
void | setShader (Shader *value) |
void | setRaytracingShader (Shader *value) |
void | setQualityMetric (float value) |
void | setDirtyNodeTransform (bool value) |
void | meshBoundsUpdated () |
void | meshLayoutUpdated () |
bool | isCompatibleWith (Shader *shade) const |
void | updateBasicShader () |
virtual void | exportClassToTree (nkExport::Node *rootNode) override |
virtual void | importClassFromTree (nkExport::Node *rootNode) override |
![]() | |
Exportable () | |
virtual | ~Exportable () |
A LOD slot to potentially draw, within a group slot.
This represents the end point in the rendering information, linking a mesh to a shader. The default render strategy will select one LOD to render, using provided information.
nkGraphics::EntityRenderLodSlot::EntityRenderLodSlot | ( | ) |
Default constructor.
Legacy convenience constructor.
mesh | The mesh to use. |
shader | The shader to use. |
nkGraphics::EntityRenderLodSlot::~EntityRenderLodSlot | ( | ) |
Destructor.
const BoundingBox& nkGraphics::EntityRenderLodSlot::getBounds | ( | ) | const |
Mesh* nkGraphics::EntityRenderLodSlot::getMesh | ( | ) | const |
Shader* nkGraphics::EntityRenderLodSlot::getShader | ( | ) | const |
Shader* nkGraphics::EntityRenderLodSlot::getRaytracingShader | ( | ) | const |
float nkGraphics::EntityRenderLodSlot::getQualityMetric | ( | ) | const |
Shader* nkGraphics::EntityRenderLodSlot::getActiveShader | ( | ) | const |
EntityRenderInfoSlot* nkGraphics::EntityRenderLodSlot::getParentSlot | ( | ) | const |
Entity* nkGraphics::EntityRenderLodSlot::getParentEntity | ( | ) | const |
void nkGraphics::EntityRenderLodSlot::setMesh | ( | Mesh * | value | ) |
Sets the mesh to use during rendering.
value | The mesh to use. |
void nkGraphics::EntityRenderLodSlot::setShader | ( | Shader * | value | ) |
Sets the shader to use during a RenderScenePass. This shader will be used, or not, depending on its compatibility with linked mesh.
value | The shader to use. |
void nkGraphics::EntityRenderLodSlot::setRaytracingShader | ( | Shader * | value | ) |
Sets the shader to use during a RaytracingPass.
value | The shader to use. |
void nkGraphics::EntityRenderLodSlot::setQualityMetric | ( | float | value | ) |
Sets the quality metric which can be used for LOD selection. This number can represent anything, but needs a meaning that can be interpreted by the RenderStrategy which will use it. For an exemple of how this could be interpreted, check the DefaultRenderStrategy.
value | The value to provide. |
void nkGraphics::EntityRenderLodSlot::setDirtyNodeTransform | ( | bool | value | ) |
Sets the transformation dirty flag. Used internally.
void nkGraphics::EntityRenderLodSlot::meshBoundsUpdated | ( | ) |
Notifies that the bounds have been udpated. Used internally.
void nkGraphics::EntityRenderLodSlot::meshLayoutUpdated | ( | ) |
Notifies that the mesh's layout has been updated. Used internally.
bool nkGraphics::EntityRenderLodSlot::isCompatibleWith | ( | Shader * | shade | ) | const |
shade | The shader to test against. |
void nkGraphics::EntityRenderLodSlot::updateBasicShader | ( | ) |
Updates the basic shader used by the LOD, based on the active mesh. The basic shader refers to the best built-in shaders that can be used within the component.
|
overridevirtual |
Basic exporting capabilities.
rootNode | The tree to export to. |
Implements nkExport::Exportable.
|
overridevirtual |
Basic importing capabilities.
rootNode | The tree to import from. |
Implements nkExport::Exportable.